package com.suzhouhe.util.enums;

/**
 * 状态枚举
 *
 * @author suzhouhe
 * @date 2020-11-03 11:40
 **/
public enum HttpStatus {

    /**
     * 状态枚举
     */
    SUCCESS(200, "成功"),
    WAIT(202, "一个请求已经进入后台排队"),
    FAIL(400, "失败"),
    NO_LOGIN(401, "没有登录"),
    NO_PERMISSION(401, "没有权限"),
    AUTH_EXPIRES(401, "授权过期"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误"),

    /**
     * 错误的请求
     */
    PAGE_NULL(404, "请求页面不存在"),
    REMOTE_SERVICE_NULL(404, "远程服务不存在"),
    IO_ERROR(500, "流读取异常"),
    ;

    private Integer value;

    private String msg;

    HttpStatus(Integer value, String msg) {
        this.value = value;
        this.msg = msg;
    }

    public Integer getValue() {
        return value;
    }

    public String getMsg() {
        return msg;
    }

}
